working on angular functions