Commit #1

Provided implementation for both functions