Landlord not repaying security deposit

Hii.. I resided in a home which was mentioned having car parking. Initialy i found a car,parked in that slot i asked my house owner whether that car will be taken he said yes!! There was damaged locks in the house for that house owner said it will be repaired. He did but not good condition. Now, no parking available and also master bedroom has problem of electricity. Issue was reported to my house owner but never cared. So i rang up my house owner and said am vacating by jan end ( starting period of residency: dec 05 2017 and day which i told him about vacating was dec 20 2017) one month before i told him. No agreement was made since i was not confortable in initial stages itself. I have given him 40k advance which will be deducted for two months rent.. remaining 20k he has to repay. But he is refusing to pay. Stating until new tenant comes he cannot give the amount and asking me to stay there for next two months also. He was speaking rubbish on me and no answer if i call him. He shared his brother contact, i spoke to him. He asked me to put tolet board on jan 10th .. someone saw the board and asked about the tolet. House owner brother called me and said some tenant is likely to come so you can vacate as you wish on feb 4th so i started seeinh new house and given token advance as 7k. Now, when the house owner brother called new tenant there was no response now again they are creating problem to me and compelling me to stay. It was like mental pressuee and black mailing since my money is with them. That house owner also used some rubbish words on my father. I dint know what to do. I want my deposit amount back. Can anyone help.