working intial version