working initial solution