First attempt at completing assignment