updated with working