merged working master code to sprint 1 branch