playing around with basic algorithms