modified 1b so it works more correctly