removed bugs and done improvement on exisiting code
updated mini file