added prompt function and abs